<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        div{
            /* display   1.block块级  2.inline行内 3.inline-block行内块 */
            display: inline-block;
            width: 400px;
            height: 100px;
        }
        .d1{
            background-color: #ffa8a8;
        }
        .d2{
            background-color: #6568ff;
        }
    </style>
</head>
<body>
    <!-- boxsizing -->
    <div class="d1">
        d1
    </div>
    <div class="d2">
        d2
    </div>
</body>
</html>